package com.zsc.boot.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zsc.boot.bean.Team;
import com.zsc.boot.bean.User;
import com.zsc.boot.bean.dto.TeamQuery;
import com.zsc.boot.bean.request.TeamJoinRequest;
import com.zsc.boot.bean.request.TeamQuitRequest;
import com.zsc.boot.bean.request.TeamUpdateRequest;
import com.zsc.boot.bean.vo.TeamUserVO;

import java.util.List;

/**
 *
 */
public interface TeamService extends IService<Team> {

    /**
     * 创建队伍
     *
     * @param team：所要创建的队列
     * @param loginUser：当前的登录用户
     * @return
     */
    public long createTeam(Team team, User loginUser);

    /**
     * 查询队伍
     *
     * @param teamQuery
     * @param isAdmin
     * @return
     */
    public List<TeamUserVO> listTeam(TeamQuery teamQuery,boolean isAdmin);

    /**
     * 更新队伍
     *
     * @param teamUpdateRequest
     * @param loginUser
     * @return
     */
    public boolean updateTeam(TeamUpdateRequest teamUpdateRequest, User loginUser);

    /**
     * 用户加入队伍
     *
     * @param teamJoinRequest
     * @param loginUser
     * @return
     */
    public boolean joinTeam(TeamJoinRequest teamJoinRequest, User loginUser);

    /**
     * 用户退出队伍
     *
     * @param teamQuitRequest
     * @param loginUser
     * @return
     */
    public boolean quitTeam(TeamQuitRequest teamQuitRequest, User loginUser);

    /**
     * 队长解散队伍
     *
     * @param teamQuitRequest
     * @param loginUser
     * @return
     */
    public boolean leaderQuitTeam(TeamQuitRequest teamQuitRequest, User loginUser);

    /**
     * 查询我创建的队伍
     * @param teamQuery
     * @return
     */
    List<TeamUserVO> listMyCreateTeam(TeamQuery teamQuery);
}
